<!DOCTYPE html>
<html>

<head>
<meta charset="UTF-8">
<title>后台管理</title>
<link rel="stylesheet"
	href="${request.contextPath}${staticPath}/admin/plugins/bootstrap/css/bootstrap.min.css">
<script
	src="${request.contextPath}${staticPath}/admin/plugins/jquery/jquery-3.4.1.min.js"></script>
<script
	src="${request.contextPath}${staticPath}/admin/plugins/bootstrap/js/bootstrap.min.js"></script>
<!--引入ckeditor-->
<script type="text/javascript"
	src="${request.contextPath}/admin/ckeditor/ckeditor.js"></script>
<style type="text/css">
#basicSelect{
width: 300px;
height: 30px;
}
</style>
</head>

<body>
<div class="container">

	<h2>修改</h2>      
	<form action="/admin/article/articleEdit" method="post">
	<div class="form-group">
        <select id="basicSelect" name="sort" >
	        <#list sort as menus>
	            <option onclick="findSelected(this)" <#if menu.sortName == menus.name> selected </#if> value="${menus.id}">${menus.name}</option>
	        </#list>
        </select>
        <input type="hidden" name="sortName" id="sortName" value="${menu.sortName}">
        
    </div>
	
	  <div class="form-group">
	    <label for="title">文章标题</label>
	    <input type="text" class="form-control" name="title" id="title" value="${menu.title}" placeholder="请输入文章标题">
	  </div>
		<div>
			<!--加入ckdeitor类使其为富文本编辑器-->
			<textarea class="ckeditor" name="content" value="${menu.content}" ></textarea>
		</div>
		
		<input type="submit" class="btn btn-default" value="提交" />
	</form>
</div>
</body>
<script>
	$(document).ready(function(){
    	CKEDITOR.replace('content');
	});
	function findSelected(e){
		console.log(e.text)
		$("#sortName").val(e.text)
	}
</script>
</html>
